# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-docker-py
pkgver=7.0.0
pkgrel=0
pkgdesc="Python library for the Docker Engine API"
url="https://github.com/docker/docker-py"
arch="noarch"
license="Apache-2.0"
options="!check" # no docker avail
depends="
	py3-packaging
	py3-requests
	py3-urllib3
	py3-websocket-client
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-setuptools_scm
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/docker/docker-py/archive/$pkgver.tar.gz"
builddir="$srcdir/docker-py-$pkgver"

provides="docker-py=$pkgver-r$pkgrel"
replaces="docker-py"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer --destdir="$pkgdir" .dist/*.whl
}

sha512sums="
1ddfdc6d533d9e623baf8bbf1243272d6e511c2bb356c82d9401e566733794d38aa34df151788f1ad807fe7ba0144cc428e0b7f74acd888a58afc61c09c6d09c  py3-docker-py-7.0.0.tar.gz
"
